package net.hn.hnms.biz.sewage.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 智呈物联 nzw
 * @date 2022/9/24
 */
public class PersonOnDuty {

    public static Map<String,String> user(List<Map<String,String>> users){
        Map<String,String> map = new HashMap<>();
        String userName = "";
        String userCode = "";
        for (int i=0;i<users.size();i++){
            Map<String,String> user = users.get(i);
            if (i==users.size()-1){
                userCode = userCode+user.get("code");
                userName = userName+user.get("name");
            }else {
                userCode = userCode+user.get("code")+",";
                userName = userName+user.get("name")+",";
            }
        }
        map.put("userName",userName);
        map.put("userCode",userCode);
        return map;
    }
}
